﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using STLGROUP.Layers.Presentations;
using STLGROUP.Layers.ReportTemplates;
using STLGROUP.Layers.Common;

namespace QuanLyBanHang
{
    public partial class RF002 : frmReportBase
    {
        public RF002()
        {
            InitializeComponent();
            this.Load += new EventHandler(RF002_Load);
        }

        private void RF002_Load(object sender, EventArgs e)
        {
            CR002_BaoGiaSanPham rp = new CR002_BaoGiaSanPham();
            var data = Cache.Context.View_ThongKeSanPham.Select(s=>new { 
                s.STT
                ,s.MaSanPham
                ,s.TenSanPham              
                ,s.GiaBanLe
                ,s.GiaBanSi
                ,s.MoTa                
                ,s.DonViTienTe
            });
            rp.SetDataSource(data);

            crystalReportViewer.ReportSource = rp;

        }
    }
}
